﻿namespace Wedn.Model.Data
{
    /// <summary>
    /// 标签分类实体模型类(初步审核通过)
    /// </summary>
    public class Term
    {
        #region 所有字段
        private int id;
        private string name;
        private string slug;
        private string type;
        private int parentId;
        private string description;
        #endregion

        #region 对外公共属性
        /// <summary>
        /// 分类标签表主键字段
        /// </summary>
        public int Id
        {
            get { return id; }
            set { id = value; }
        }
        /// <summary>
        /// 分类或标签名称字段
        /// </summary>
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        /// <summary>
        /// 分类或标签别名字段
        /// </summary>
        public string Slug
        {
            get { return slug; }
            set { slug = value; }
        }
        /// <summary>
        /// 类型(category|tag..)字段
        /// </summary>
        public string Type
        {
            get { return type; }
            set { type = value; }
        }
        /// <summary>
        /// 分类父ID字段
        /// </summary>
        public int ParentId
        {
            get { return parentId; }
            set { parentId = value; }
        }
        /// <summary>
        /// 分类描述字段
        /// </summary>
        public string Description
        {
            get { return description; }
            set { description = value; }
        }
        #endregion

        #region 构造函数
        public Term() { }
        /// <summary>
        /// 标签分类实体模型类构造函数
        /// </summary>
        /// <param name="id">分类或标签ID</param>
        /// <param name="name">分类或标签名称</param>
        /// <param name="slug">分类或标签别名</param>
        /// <param name="type">类型(category|tag..)</param>
        /// <param name="parentId">分类父ID</param>
        /// <param name="description">分类描述</param>
        public Term(int id, string name, string slug, string type, int parentId, string description)
        {
            this.id = id;
            this.name = name;
            this.slug = slug;
            this.type = type;
            this.parentId = parentId;
            this.description = description;
        }
        #endregion
    }
}
